package homework.extendwork3.coding;

public class Person extends Object{
    private String name;
    protected  String sex;
    public Person(String name,String sex){
        this.setName(name);
        this.setSex(sex);
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", sex='" + sex + '\'' +
                '}';
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
}
